import http from "@/api/config/http";
import { IQuery, IResponse, ITableResponse } from "@/types/http/IAxios";
import { Font } from "./types";

export function queryFont(query?: IQuery): Promise<ITableResponse<Font>> {
  return http.request({
    url: "/fonts/fonts/list",
    method: "get",
    params: query
  });
}

export function font(data?: Partial<IQuery>): Promise<IResponse<Font>> {
  return http.request({
    url: "/fonts/fonts",
    method: "post",
    data
  });
}

export function deleteFont(id: string): Promise<IResponse<Font>> {
  return http.request({
    url: `/fonts/fonts/${id}`,
    method: "delete"
  });
}
